#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

int n, m;
char rev[128];
void init() {
  string s = "AEHIJLMOSTUVWXYZ12358";
  string t = "A3HILJMO2TUVWXY51SEZ8";
  int n = s.size();
  rep(i, 0, n - 1) rev[s[i]] = t[i];
}
bool check_p(string s) {
  string t = s;
  reverse(t.begin(), t.end());
  return t == s;
}
bool check_m(string s) {
  string t;
  for (char c : s) {
    if (!rev[c]) return false;
    t.push_back(rev[c]);
  }
  reverse(t.begin(), t.end());
  return t == s;
}
int solve(string s) {
  int res = 0;
  if (check_p(s)) res |= 1;
  if (check_m(s)) res |= 2;
  return res;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  init();
  string s;
  while (cin >> s) {
    int res = solve(s);
    cout << s;
    if (res == 0)
      cout << " -- is not a palindrome." << endl << endl;
    else if (res == 1)
      cout << " -- is a regular palindrome." << endl << endl;
    else if (res == 2)
      cout << " -- is a mirrored string." << endl << endl;
    else
      cout << " -- is a mirrored palindrome." << endl << endl;
  }
  return 0;
}